public class Test {

    public static void main(String[] args) {
        Tree tree = new Tree();
        Tree.TreeNode root = tree.createTree();

//        System.out.println( " 获取树的高度");
//        int ret = tree.getHeight(root);
//        int ret2 = tree.getHeight2(root);
//        System.out.println(ret);
//        System.out.println(ret2);

        int ret3 = tree.getLeafNodeCount(root);
        System.out.println(ret3);
    }

    public static void main1(String[] args) {
        Tree test = new Tree();
        Tree.TreeNode root = test.createTree();

        System.out.println(" 获取第K层节点的个数");
        int ret = test.getKLevelNodeCount(root,3);
        System.out.println(ret);

    }



}
